import 'package:flutter/material.dart';
import 'pages/Tabs.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData(
        useMaterial3: false,
        primarySwatch: Colors.blue,
      ),
      home: const MyHome(),
      //去掉右上角debug图标
      debugShowCheckedModeBanner: false,
    );
  }
}

class MyHome extends StatelessWidget {
  const MyHome({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        //配置左侧widget
        leading: IconButton(
          icon: const Icon(Icons.menu),
          onPressed: (){
            print("左侧按钮图标");
          },
        ),
        title: const Text("Flutter App"),
        //配置右侧widget,可配置多个
        actions: [
          IconButton(onPressed: (){}, icon: const Icon(Icons.search)),
          IconButton(onPressed: (){}, icon: const Icon(Icons.menu)),
        ],
      ),
    );
  }
}

